import { reqCategorySidebar } from "@/api/category";

const state = {
  list: [],
};
const actions = {
  async getCategoryList({ state, commit, dispatch }) {
    let result = await reqCategorySidebar();
    console.log(result);
    commit("GETCATEGORY", result.data.categoryL1List);
  },
};
const mutations = {
  GETCATEGORY(state, list) {
    state.list = list;
  },
};
const getters = {};

export default {
  namespaced: "category",
  state,
  actions,
  mutations,
  getters,
};
